package context
{
	import flash.display.NativeMenu;
	import flash.display.NativeMenuItem;
	import flash.events.Event;

	public class TabbarContext extends NativeMenu
	{
		public static const ADD:String = "New Note";
		public static const RENAME:String = "Rename";
		public static const SAVE:String = "Save";
		public static const CLOSE:String = "Close";
		public static const CLOSE_OTHER:String = "Close Others";
		public static const DELETE:String = "Delete";
		
		public function TabbarContext()
		{
			init();
		}
		
		private function init():void
		{
			//this.addEventListener(Event.DISPLAYING, menuDisplayHandler);
			this.addEventListener(Event.PREPARING, menuDisplayHandler);
			this.addItem(new NativeMenuItem(ADD));
			this.addItem(new NativeMenuItem(RENAME));
			this.addItem(new NativeMenuItem("",true));
			this.addItem(new NativeMenuItem(SAVE));
			this.addItem(new NativeMenuItem(CLOSE));
			this.addItem(new NativeMenuItem(CLOSE_OTHER));
			this.addItem(new NativeMenuItem("",true));
			this.addItem(new NativeMenuItem(DELETE));
		}
		
		private function menuDisplayHandler(e:Event):void
		{
			//trace(e.target, e.currentTarget);
		}
	}
}